<!DOCTYPE html>
<html>
<head>
	<title>淘宝小赢家系统</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<script src="bootstrap/js/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>
<{include file='layouts/headNav.html'}>
<div class="container-fluid">
<div class="row-fluid">
	<div class="span10">
		<!--Body content-->
		<ul class="nav nav-tabs">
			<li class="active"><a href="<{spUrl c=$_controller a=update}>">修改密码</a></li>
		</ul>
		<form name="f1" method="post" action="<{spUrl c=$_controller a=update}>" onsubmit="return checkform();">
			<table style="width:800px;">
					<tr><td>旧密码:</td><td><input name="pwd" id="pwd" type="password" value="<{$tpl_data[$key]}>"></td></tr>
					<tr><td>新密码:</td><td><input name="newpwd" id="newpwd" type="password" value=""></td></tr>
					<tr><td>确认新密码:</td><td><input name="newpwd2" id="newpwd2" type="password" value=""></td></tr>
				</table>
				<label></label><br/>
				<button type="submit" class="btn btn-primary">更改</button>
				<button type="reset" class="btn">清除重填</button>
			</fieldset>
		</form>
	</div>
</div>
</div>
<script>
function checkform(){
	if(!document.f1.pwd.value){
		alert('旧密码不能为空！');
		return false;
	}
	
	if(!document.f1.newpwd.value){
		alert('新密码不能为空！');
		return false;
	}
	
	if(document.f1.newpwd.value != document.f1.newpwd2.value){
		alert('两次输入密码不一样！');
		return false;
	}
	
	return true;
}
</script>
</body>
</html>